package com.chujian.framework.sync.handler;

import com.chujian.framework.sync.SyncData;
import com.chujian.framework.sync.SyncDataFactory;
import com.chujian.framework.sync.SyncConst;

import java.lang.reflect.Method;

public class UpdHandler implements ISyncMethodHandler {

    @Override
    public String supportMethod() {
        return SyncConst.METHOD_UPD;
    }

    @Override
    public SyncData creSyncData(Method method, Object[] args, Object returnValue, Object target) {
        return SyncDataFactory.creSingleItemSyncData(SyncConst.CHANGE_TYPE_UPDATE, target, returnValue);
    }
}
